/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Ejecucion;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
 *
 * @author dcoto
 */
public class Conection {
    
 public static Connection getConnection() throws SQLException{
        try {
            Class.forName("com.mysql.jdbc.Driver");
            Connection con = DriverManager.getConnection("jdbc:mysql://localhost/tuJob", "root", "welcome1");
            System.out.println("Conectado....");
            return con;
        } catch (ClassNotFoundException ex) {
            Logger.getLogger(Conection.class.getName()).log(Level.SEVERE, null, ex);
        }
        return null;
    }
}
